from pygal.maps.world import COUNTRIES

def get_country_code(country_name):
    print("现在的城市："+country_name)
    for code,name in COUNTRIES.items():
        print(COUNTRIES.items())
        if name == country_name:
            return code
        #如果没有找到指定的国家就返回none
        return None